#include "sort.h"
#include "sql_list.h"


Elenemt_data data[10] = 
{
    {.name = "唐三" , .sex = "男" , .age = 18 , .id = 1 , .sco = 49} , 
    {.name = "萧炎" , .sex = "男" , .age = 18 , .id = 2 , .sco = 38} , 
    {.name = "小舞" , .sex = "男" , .age = 18 , .id = 3 , .sco = 65} , 
    {.name = "牧尘" , .sex = "男" , .age = 18 , .id = 4 , .sco = 97} , 
    {.name = "熏儿" , .sex = "男" , .age = 18 , .id = 5 , .sco = 76} ,
    {.name = "张三" , .sex = "男" , .age = 18 , .id = 5 , .sco = 13} ,
    {.name = "李四" , .sex = "男" , .age = 18 , .id = 5 , .sco = 27} ,
    {.name = "王五" , .sex = "男" , .age = 18 , .id = 5 , .sco = 49} ,
};




int main(int argc, char const *argv[])
{
    sql_list list;

    // 初始化和插入
    Init_Sql_List( &list );

    // 插入
    for (size_t i = 0; i < 8; i++)
    {
        insert_pos_sql_list(&list , data[i] , i + 1);
    }
    printf("------------------ 未排序 ------------------\n");
    printf_Sql_List(&list);


    Insert_Sort_sql_list_sco(&list);
    printf("------------------ 以排序 ------------------\n");
    printf_Sql_List(&list);

    return 0;
}




